
<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML>
<html>

<head>
    <title>添加节点菜单</title>
</head>
<body>

<div class="pd-20">
    <div >
        <form id='registerform'action="<%=request.getContextPath()%>/back/menu/doadd.do" method="post" class="form form-horizontal">
            <input type="hidden" id="unid"name="unid" />
            <input type="hidden" id="punid"name="punid" value="${punid}"/>
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red">*</span>名称：</label>
                <div class="formControls col-8">
                    <input type="text" class="input-text" id="menuname" name="menuname">
                </div>
                <div class="col-4"> </div>
            </div>
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red">*</span>URL：</label>
                <div class="formControls col-8">
                    <input type="text" class="input-text"  id="url" name="url">
                </div>
                <div class="col-4"> </div>
            </div>
            <div class="row cl">
                <label class="form-label col-3">是否可用：</label>
                <div class="skin-minimal">
                    <div class="check-box col-8">
                        <input type="checkbox" name="menuenable" id="checkbox-1" value="1" checked>
                        <label for="checkbox-1"></label>
                    </div>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-3">层级：</label>
                <div class="formControls col-8 skin-minimal">
                    <div class="radio-box">
                        <input type="radio" id="1"value="1" name="menulevel" checked >
                        <label for="1">一级</label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" id="2"value="2" name="menulevel">
                        <label for="2">二级</label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" id="3"value="3" name="menulevel">
                        <label for="3">三级</label>
                    </div>
                </div>
                <div class="col-4"> </div>
            </div>
            <div class="row cl" style="margin-top:25px">
                <div class="col-9 col-offset-3">

                    <button class="btn btn-primary radius" id="submitBtn"> 确定</button>&nbsp;&nbsp;&nbsp;
                    <button class="btn  radius" type='reset'> 重置</button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
<%@include file="../../head-ui.jsp" %>

<script type="text/javascript">
    $(function(){
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        var form=$("#registerform").Validform({
            tiptype:3,
            callback:function(data){
                layer.closeAll("loading");
                if(data.status=="0"){
                    layer.msg('保存成功!');
                    layer_close()
                    refreshTree();
                    $("#uuid").val(data.uuid);
                }else{
                    layer.alert('保存失败!');
                }
            },
            ajaxPost:true,
            showAllError:true

        });

        $("#submitBtn").click(function(){
            form.submitForm(false);
        })

    })
</script>

